package com.woniuxy.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.shiro.authc.AuthenticationToken;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 存放token返回token 模仿UsernamePasswordToken 将替换原来的登陆方式
 *
 */

@AllArgsConstructor
@NoArgsConstructor
@Data
@ToString
public class MyJsonWebToken implements AuthenticationToken {
    String token;

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
